
import ReactBox from 'grey-react-box';
import ControllerState from './ControllerState';
import createThree from './fns/createThree';
import updateRendererSize from './fns/updateRendererSize';
import sceneAdd from './fns/sceneAdd';
import sceneRem from './fns/sceneRem';

export { default as ControllerState } from './ControllerState';

export default class Controller extends ReactBox<ControllerState>{
    
    constructor() {
        super(new ControllerState());
    }

    /** 核心对象 */
    createThree = this.pipeline(createThree);

    /** 更新渲染器尺寸 */
    updateRendererSize = this.pipeline(updateRendererSize);

    /** 添加原件到舞台 */
    sceneAdd = this.pipeline(sceneAdd);

    /** 把原件从舞台移除 */
    sceneRem = this.pipeline(sceneRem);
}